import java.util.Random;
import java.util.Scanner;

public class Test5 {
    public static void main(String[] args) {
                    int x = 3;
                    int count = 1;
                    while(count<=32){
                        int ret = x & 1;
                        x = x>>1;
                        if(count % 2 ==0){
                            System.out.println("偶数序列"+ret);
                        }
                        else{
                            System.out.println("奇数序列"+ret);
                        }count++;
                    }
    }
    public static void main6(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int count = 0;                            //次数
        String str1 = "123456";                  //正确密码
        String str2 = "0";
        while(count!=3){                        //次数应该小于3
            System.out.println("请输入密码：");
            str2 = scanner.nextLine();
            if(str1.equals(str2)){              //比较两个字符串是否相同，判断是否启动
                System.out.println("输入正确，启动系统");
                break;
            }
            else {
                System.out.println("输入错误，请重新输入");
                count++;
                continue;
            }

        }
        if(count == 3){                         //3次输入错误，无法启动
            System.out.println("三次密码输入错误，无法启动");
        }
    }
    public static void main5(String[] args) {
        int count = 0;
        Scanner scanner = new Scanner(System.in);
        while(scanner.hasNextInt()) {
        int a = scanner.nextInt();
        int tmp =a;
        while(tmp != 0){
            int ret = tmp % 10;
            tmp /= 10;
            System.out.println(ret);
        }
    }
    }
    public static void main4(String[] args) {
       int a = 24;
       int b = 16;
       while(a % b != 0){
           int c = a % b;
           a = b;
           b = c;
       }
        System.out.println(b);
    }
    public static void main3(String[] args) {
        Scanner scanner = new Scanner(System.in);
        //生成随机数
        Random random = new Random();
        int Rnum = random.nextInt(0,101);
        while (true){
            //用户数入
             System.out.println("请输入一个0~100的整数");
             int a = scanner.nextInt();
             //判断
             if(Rnum > a){
                System.out.println("猜小了");
            }
            else if(Rnum < a){
                System.out.println("猜大了");
            }
            else {
                System.out.println("猜对了");
                break;
            }
        }
    }
    public static void main2(String[] args) {
        int sum1 = 0;
        int sum2 = 0;
        //分奇数偶数分别求和
        for (int i = 1; i <= 99; i+=2) {
                sum1+=i;
        }
        for (int k = 2; k <=100 ; k+=2) {
             sum2+=k;
        }
        //求两者倒数
        double ret1 = (double) 1/sum1;
        double ret2 = (double) 1/sum2;
        //输出
        System.out.println(ret1-ret2);
    }
    public static void main1(String[] args) {
            int count = 0;   //计数器
        for (int i = 1; i <=100 ; i++) {
            //判断个位数上有没有9
            if(i%10==9){
                        count++;
        }
            //判断十位数上有没有9
            else if(i/10%10==9)
            {
                count++;
            }
    }
        System.out.println(count);
}
}
